import axios from 'axios'

export const getStudents = (skip = 0, limit = 100) => {
  return axios.get(`/students?skip=${skip}&limit=${limit}`)
}

export const createStudent = (studentData) => {
  return axios.post('/students', studentData)
}

export const deleteStudent = (studentId) => {
  return axios.delete(`/students/${studentId}`)
}

export const rechargeStudent = (rechargeData) => {
  return axios.post('/students/recharge', rechargeData)
}

export const getStudentSessions = (studentId) => {
  return axios.get(`/students/${studentId}/sessions`)
}

// 获取充值记录接口
export const getRechargeRecords = (studentId) => {
  return axios.get(`/students/${studentId}/recharges`)
}

// 获取单个学生详情
export const getStudentById = (studentId) => {
  return axios.get(`/students/${studentId}`)
}